Pluggable sorting for distributed databases

ABSTRACT

A database server is configured to receive input data which includes a data table. Each record of the table includes a record key and one or more entries. Each of the one or more entries is associated with a corresponding column key of the data table. Instructions are received for sorting the input data according to the column key. The instructions indicate an order in which to sort the input data. Based on the order indicated by the instructions, a pluggable sorting index associated with a column key of the data table is generated. The pluggable sorting index includes the record keys arranged in a sorted order according to sortable properties of entries associated with the column key. A sorted dataset which includes the entries associated with the column key arranged according to the sorted order of the pluggable sorting index is generating using the pluggable sorting index.

TECHNICAL FIELD

The present disclosure relates generally to distributed databases. Moreparticularly, in certain embodiments, the present disclosure is relatedto pluggable sorting for distributed databases.

BACKGROUND

Data may be stored in a database in the form of one or more data tablesor data block. This data may be distributed across multiple servers in adistributed server architecture. In some cases, an individual may wishto search for a desired subset of information within this distributeddata or to view a portion of the distributed data. To achieve this, thedata may need to be sorted, and, in some cases, information distributedto different data tables or data blocks may need to be combined orjoined. There exists a need for improved tools for sorting and joiningsuch data.

SUMMARY

There is currently an increasing demand for the analysis of large anddistributed datasets, which may include multiple data tables or datablocks, storing data that may originate from a variety of data sources.This disclosure encompasses the recognition of previously unrecognizedproblems associated with sorting and/or joining such datasets and alsoprovides unique solutions to these problems. For example, inconventional approaches to sorting information stored in one or moredata tables, the data tables may be duplicated and/or altered (e.g.,rearranged) in order to sort and/or join the data as desired.Conventional approaches such as this are associated with severaldisadvantages including, for example, the consumption of large amountsof memory and processing resources. For instance, prior to the systemsand methods described in this disclosure, large amounts of memory wererequired to be allocated to the task of joining datasets. In some cases,the input data itself may be altered (e.g., to achieve a desired sortedorder), resulting in the risk of loss of data and decreased datareliability.

In one embodiment, a system includes a database server configured toreceive input data from one or more data sources. The input dataincludes a data table, which includes records (e.g., rows of the datatable). Each record includes, or is associated with, a record key andone or more entries. Each of the one or more entries is associated witha corresponding column key of the data table. The server receivesinstructions for sorting the input data according to the first columnkey. The instructions indicate an order in which to sort the input data.In response to receipt of the instructions, the server generates, basedon the order indicated by the instructions, a first pluggable sortingindex associated with a first column key of the data table. The firstpluggable sorting index includes the record keys arranged in a sortedorder according to sortable properties of entries associated with thefirst column key. The sortable properties of the entries associated withthe first column key are alphanumeric characters included in theentries. The alphanumeric characters can be sorted in one or both of anumerical and an alphabetical order. The server generates a first sorteddataset, based on the data table and the first pluggable sorting index.The first sorted dataset includes the entries associated with the firstcolumn key arranged according to the sorted order of the first pluggablesorting index.

In another embodiment, a system includes a database server configured toreceive a first dataset. The first dataset includes a first plurality ofdata blocks, where each of the first plurality of data blocks includes aset of first records. Each first record is associated with acorresponding first record key. The server receives a second dataset,which includes a second plurality of data blocks. Each of the secondplurality of data blocks includes a set of second records, and eachsecond record is associated with a corresponding second record key. Theserver receives instructions to join the first dataset and the seconddataset. The database server includes a sorter configured to, inresponse to receipt of the instructions, sort the first dataset and thesecond dataset such that the set of first records for each first datablock is arranged based on values of the first record keys and the setof second records for each second data block is arranged based on valuesof the second record keys. The server further includes a joinerconfigured to extract a first root element from the first dataset. Thefirst root element includes the first record key with the greatest valueamong the first record keys. The joiner extracts a second root elementfrom the second dataset. The second root element includes the secondrecord key with the greatest value among the second record keys. Thejoiner determines whether the first and second root elements match. Inresponse to determining that the first and second root elements match,the joiner generates an output by joining the first record associatedwith the first root element with the second record associated with thesecond root element.

The systems described in the present disclosure provide technicalsolutions to the technical problems of previous systems, including thosedescribed above, by facilitating the efficient sorting and/or joining ofdata. The disclosed systems and methods provide several advantages whichinclude 1) efficient and effective generation of appropriately sortedand/or joined datasets or data streams with decreased memory consumptionand processing costs, 2) effective data sorting without duplicationand/or alteration of input data (and without the associated risk of dataloss and decreased data integrity), and 3) generation of a joined outputas a data stream, which may be accessed and/or transmitted as it isgenerated. As such, the system described in the present disclosure mayimprove the function of computer systems used for sorting informationstored in a distributed database and combining information found inmultiple datasets by providing efficient approaches to sorting data andjoining datasets. The systems and methods may also reduce or eliminatetechnological bottlenecks to the analysis of large datasets. Forexample, the output of the described systems may facilitate theefficient generation of appropriately sorted and joined datasets foreffective analysis, which was otherwise impossible using previouslyavailable technology. The systems described in the present disclosuremay also be integrated into a variety of practical applications forautomatic sorting of large datasets without surpassing available memoryand processing capacities and for efficiently joining sorted datasets ina stream-wise fashion without storing superfluous records that are notused in the joined output data stream.

Certain embodiments of the present disclosure may include some, all, ornone of these advantages. These advantages and other features will bemore clearly understood from the following detailed description taken inconjunction with the accompanying drawings and claims.

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of this disclosure, reference is nowmade to the following brief description, taken in connection with theaccompanying drawings and detailed description, wherein like referencenumerals represent like parts.

FIG. 1 is a schematic diagram of a database system, according to anillustrative embodiment of this disclosure;

FIG. 2 is a schematic diagram illustrating an example of pluggable datasorting using the system illustrated in FIG. 1;

FIG. 3 is a diagram illustrating the joining of two datasets using thesystem illustrated in FIG. 1; and

FIG. 4 is an embodiment of a device configured to implement the systemillustrated in FIG. 1.

DETAILED DESCRIPTION

As described above, prior to the present disclosure, there was a lack oftools for effectively and reliably sorting and joining data stored indistributed databases. As described with respect to illustrativeexamples of FIGS. 1-4 below, the present disclosure facilitates theefficient generation of sorted and/or joined data from input data, whichmay, in some embodiments, be stored in a distributed database server.

FIG. 1 is a diagram of a database system 100, according to anillustrative embodiment of the present disclosure. The database system100 includes one or more data sources 104 a-c, a database server 106, acomputing device 122, and a network 124. The database system 100 isgenerally configured to generate, via the database server 106, sorteddata 114 and/or output data 120 based on input data 108, which mayinclude information from one or more of the datasets 104 a-c receivedfrom data sources 102 a-c. The uniquely configured database server 106may facilitate efficient data sorting using sorter 112 and efficientjoining of sorted data 114 using joiner 118 to generate output data 120.The database system 100 may be configured as shown or in any othersuitable configuration.

The data sources 102 a-c include sources (e.g., data repositories,computing devices, etc.) of datasets 104 a-c. Each of the datasets 104a-c may include data stored in any format and in any file type that maybe accessed by the database server 106. Datasets 104 a-c may include oneor more data tables, which may be received as input data 108 (orcompiled to generate input data 108) by database server 106. Exampledata tables are described in greater detail below with respect to FIG.2. The data sources 102 a-c are generally any devices configured tostore corresponding datasets 104 a-c and provide datasets 104 a-c to thedatabase server 106 (e.g., via network 124). For example, one or more ofthe data sources 102 a-c may be a computing device configured to storethe corresponding datasets 104 a-c and transmit the datasets 104 a-c todatabase 106, or facilitate retrieval or extraction of the datasets 104a-c by the database server 106. In some embodiments, each of the datasources 102 a-c may be associated with a unique entity. For example,data source 102 a may be associated with an individual business (e.g.,such that dataset 104 a includes information about transactions at astore, for example, from one or more cash registers), data source 102 bmay be associated with an individual (e.g., such that dataset 104 b mayinclude information about the individual, for example, from a customerprofile), and data source 102 c may be associated with groups ofentities (e.g., such that dataset 104 a includes information about thegroup). Each of data sources 104 a-c may be located in a differentgeographical location. While three data sources 102 a-c are depicted inthe example of FIG. 1, it should be understood that system 100 mayinclude anywhere from one to hundreds, thousands, or more data sources.Each of the data sources 102 a-c may be implemented using the hardware,memory, and interfaces of device 400 described with respect to FIG. 4below.

The database server 106 generally includes at least one computing deviceand is configured to receive one or more of the datasets 104 a-c (orportions thereof) as input data 108. In general, the database server 106may be a standalone server or a distributed server (e.g., executed on aplurality of local and/or distributed devices or as a cluster ofdevices). The input data 108 may include all or a portion of thedatasets 104 a-c. The input data may include one or more tables (e.g.,such as data tables 200, 212, 214, 216 of FIG. 2) and may be stored as aplurality of data blocks (e.g., the data blocks 308 a-e and 312 a-h ofFIG. 3) to facilitate distribution of the input data 108 in adistributed database server

The database server 106 may receive or access instructions 110 forsorting and/or joining the input data 108. For example, the instructions110 may indicate which information should be sorted in the input data108 (e.g., which subset of the input data 108 should be sorted) andrules for sorting the input data 108 (e.g., whether the data should besorted in ascending or descending order, e.g., whether the data shouldbe sorted based on numerical characters or alphabetical characters, orboth). As another example, the instructions 110 may be associated withwhich information should be joined in the input data 108. Whileinstructions 110 may be received from an external source (e.g., vianetwork 124, as shown in the illustrative example of FIG. 1), theinstructions 110 may alternatively be “received” by accessing predefinedsort and/or join instructions 110 stored in the database server 106.Accessing predefined instructions 110 may, for example, allow input data108 to be sorted and/or joined automatically (e.g., based on apredefined schedule and/or program—see scheduling data 412 of FIG. 4below), without requiring that instructions be provided from othercomponents or individuals. Database server 106 may be implemented usingthe hardware, memory, and interfaces of device 400 described withrespect to FIG. 4 below.

The sorter 112 of database server 106 is generally configured to sortthe input data 108, based on instructions 110, to generate sorted data114. For example, information in the input data 108 may be sorted basedon a particular feature, or sortable property, of the input data 108.For example, information in the datasets may be sorted according toproperties of alphanumeric characters included in entries associatedwith sortable records of the datasets (e.g., based on a numerical oralphabetical order of the characters). For instance, records (e.g., rowsof information stored in data tables) of the input data 108 may besorted in a predefined order. The predefined order may be an ascendingor descending order and may be one or both of a numerical and/or analphabetical order. In general, records in the input data 108 may besorted based on any sortable property. For example, records may besorted based on corresponding entries that include names or any otheralphanumeric strings, which may be arranged in alphabetical order (e.g.,either ascending from A to Z or descending from Z to A). Likewise,records may be sorted according to values of corresponding numericalentries, which may be arranged in numerical order (e.g., ascending fromlowest to highest or descending from highest to lowest). In some cases,records may be sorted according to corresponding entries that includeboth alphabetical and numerical characters by first sorting inalphabetical order and then sorting in numerical order (or vice versa,as desired). In some embodiments, the sorter 112 is configured toperform pluggable sorting as described in greater detail below withrespect to FIG. 2.

In such embodiments, the sorter 112 may particularly facilitateefficient and rapid sorting of the input data 108 without duplicating,altering, or otherwise modifying the input data 108 in any way. Suchembodiments may, for example, facilitate accessing the input data 108 ina sorted “view,” such that the data 108 is effectively accessed, or“viewed,” as sorted data 114 without requiring a separate copy of data108.

The joiner 118 is generally configured to join datasets of the inputdata 108 based on joining instructions 110. The joiner 118 joins inputdata 108, or appropriately sorted data 114, to generate output data 120.As described in greater detail with respect to FIG. 3 below, joiningdatasets may involve, for example, combining records from two or moredatasets that have matching record keys, while discarding records thatlack a matching record key in the other dataset. In some cases, thejoiner 118 may be referred to as a reducer, as datasets are not onlyjoined but the overall size of the output data 120 may be less than thatof the input data 108 (e.g., because un-joined data may be discarded).In some embodiments, the joiner 118 may facilitate the generation ofoutput data 120 in a stream-wise, or sequential, fashion as data stream116 (e.g., as described with respect to FIG. 3 below). This mayfacilitate access to output data 120 as it is generated (e.g., in nearreal-time), rather than requiring the entire join process to becompleted before the output data 120 can be accessed. Data stream 116may be transmitted as the output data 120 is generated to a separatecomputing device 122 for further analysis or inspection. An exampleimplementation of the joiner 118 is described in greater detail belowwith respect to FIG. 3.

Computing device 122 is generally any device configured to receiveinformation from the database server 106 (e.g., via network 124). Forexample, computing device 122 may receive the output data 120 and/ordata stream 116 generated by the database server 106. Device 122 may bea stand-alone device such as a personal computer or mobile device or maybe a computing tool for analyzing output data 120. As such, device 122may be a server, for example, configured for big data analysis (e.g.,big data analysis) of output data 120. Device 122 may be configured toreceive each newly generated portion of the output data 120 sequentially(e.g., in portions) in the form of data stream 116 as the output data120 is generated. Generally, device 122 may be implemented using thehardware, memory, and interfaces of device 400 described with respect toFIG. 4 below.

Network 124 facilitates communication between and amongst the variouscomponents of the database system 100. This disclosure contemplatesnetwork 124 being any suitable network operable to facilitatecommunication between the components of the system 100. Network 124 mayinclude any interconnecting system capable of transmitting audio, video,signals, data, messages, or any combination of the preceding. Network124 may include all or a portion of a public switched telephone network(PSTN), a public or private data network, a local area network (LAN), ametropolitan area network (MAN), a wide area network (WAN), a local,regional, or global communication or computer network, such as theInternet, a wireline or wireless network, an enterprise intranet, or anyother suitable communication link, including combinations thereof,operable to facilitate communication between the components.

Example implementations of sorter 112 configured for pluggable sortingand joiner 118 configured to generate output data 120 for inclusion, asit is generated, in data stream 116 are described with respect to FIGS.2 and 3, respectively, in the subsections below.

Pluggable Sorting

As described above with respect to the example of FIG. 1, in someembodiments, the sorter 112 is configured for pluggable sorting of inputdata 108 to generate sorted data 114. To perform pluggable sorting, thesorter 112 generally employs unique sorting indices, which correspond tothe sorted order of information stored in various columns of data tablesincluded in input data 108. Pluggable sorting facilitates efficient andautomatic sorting of input data 108. Thus, rather relying on duplicationand/or manipulation of input data 108 itself, the sorted data 114 can beautomatically generated, or “viewed,” using the innovative sortingindices described in this disclosure.

FIG. 2 illustrates an example implementation of sorter 112 configuredfor pluggable sorting. Data table 200 and the associated dimensiontables 212, 214, 216 are included in input data 108 of FIG. 1. Datatable 200 includes records 204 a-i (e.g., rows of the data table 200).Each record 204 a-i generally includes a record key (i.e., correspondingto the “Record Key” column 202 a of data table 200). Each record key maybe any appropriate alphanumeric character or string identifying thecorresponding record. For example, a record key may be a customeridentifier, and each record 204 a-includes entries associated with thecustomer corresponding to the customer identifier.

In the example of table 200, the records 204 a-i are arranged inascending order of their corresponding record keys (i.e., from 0 to 8).Each record 204 a-i also has at least one entry, which is associatedwith a corresponding column key (e.g., a column identifier associatedwith columns 202 b-e of the data table 200) and includes informationassociated with the record and the column key. In other words, each ofrecords 204 a-i includes a record key (in column 202 a) and entries (incolumns 202 b-e). Each column 202 b-e has a corresponding column key(i.e., “Time key” for column 202 b, “Key A” for column 202 c, “Key B”for column 202 d, and “Key C” for column 202 e). The entries in eachcolumn are associated with the corresponding column key (e.g., entriesA0 to A8 are associated with the column key “Key A”).

A column key may also be associated with a corresponding dimension table(e.g., one of dimension tables 212, 214, 216 of FIG. 2) which storesadditional information related to the column key. For example, the timedimension table 212, the Key A dimension table 214, and the Key Bdimension table 216 are associated with the Time Key of column 202 b,Key A of column 202 c, and Key B of column 202 c, respectively. Thisdimension table-based structure allows additional information associatedwith each column key to be stored in separate tables, thereby preventingany one table from becoming too large or unwieldy for storage ormanipulation. This approach may also facilitate storage of data 108 indatabase server 106 when server 106 is a distributed server.

As an example, if data table 200 stores customer information, the recordkeys (i.e., numbers 0 to 8 in column 202 a) may correspond to customeridentifiers and the entries associated with Key A, Key B, and Key C maycorrespond to product information, customer information, and promotionaloffer information, respectively. For instance, record 204 c, which has arecord key value of 2, may include a first entry corresponding to theTime Key of column 202 b of “23 Apr. 2003” (e.g., the date on which atransaction occurred), a second entry corresponding to Key A of column202 c of “A5” (e.g., a product code for a product purchased on thisdate), a third entry corresponding to Key B of column 202 d of “B1”(e.g., a store identifier for the store at which the product waspurchased), and a fourth entry corresponding to Key C of column 202 d of“C3” (e.g., corresponding to any other information describing thecustomer and/or his/her transaction).

The sorter 112 may generate a pluggable sorting index (e.g., one or moreof the example indices 206, 208, 210) for any one or more of the columnkeys of table 200. Each pluggable sorting index is associated with acorresponding column key of the data table 200 and includes informationfor automatically sorting records 204 a-i according to sortableproperties of the entries. The sortable properties may be the values ofnumbers included in the entries (e.g., to sort in ascending ordescending numerical order) and/or the letters included in the entries(e.g., to sort in ascending or descending alphabetical order). Apluggable sorting index may be generated by identifying criteria thatare to be used to sort information in the input data 108. For example,the sorting criteria may be provided as part of instructions 110 and mayindicate how records should be sorted (e.g., in ascending or descendingnumerical or alphabetical order). From these, criteria a sorted order ofthe record keys of column 202 a may be determined for the column keys oftable 200. The pluggable sorting indices (e.g., indices 206, 208, 210)are generated as arrays which include the record keys arranged in thesorted order.

For instance, in the example of FIG. 2, a first pluggable sorting index206 is associated with the “Time Key” (column 202 b) and is an array ofthe record keys (i.e., of column 202 a) arranged according to a sortedorder of the entries in column 202 b for the Time Key. For example, theentries “5, 2, 1, 8, 4, 6, 7, 3, 0” of the sorting index 206 correspondto the record keys of column 202 a arranged such that the entries ofcolumn 202 b are sorted in ascending order from earliest to latest date.For example, record 204 f with record key 5 (i.e., the first entry inthe pluggable sorting index 206) includes an entry with the earliestdate (“3 Aug. 2001”) in column 202 b, and record 204 c with record key 2(i.e., the second entry in pluggable sorting index 206) stores the nextearliest date (“23 Apr. 2003”) in column 202 b. As further examples, thepluggable sorting indices 208 and 210 include record keys arranged in anorder corresponding to sorting the entries associated with Key A (incolumn 202 c) and Key B (in column 202 d) in ascending order (i.e., fromA1 to A7 for Key A and from B1 to B7 for Key B). The pluggable sortingindices 206, 208, 210 may also be used to sort entries in the associateddimension tables 212, 214, 216. For example, the sorting index 206 forthe Time Key may be used to sort records in the time dimension table212. After being generated, the pluggable sorting index may be storedfor future use with the same data table 200 or a different data tablethat includes the same column key (i.e., pluggable sorting index 206 cangenerally be used with other data tables that employ the same columnkey).

In general, each of the pluggable sorting indices 206, 208, 210 can beused to automatically access or “view” the entries in the correspondingcolumns 202 b, 202 c, 202 d (and optionally additional informationstored in the corresponding dimension tables 212, 214, 216) in a sortedorder without modifying (e.g., rearranging) the order of the records 204a-i in table 200 (or the associated dimension tables 212, 214, 216).Referring again to FIG. 1, this may facilitate efficient use,visualization, or analysis of the input data 108 without the processingor memory usage overhead required by previous technologies. The databaseserver 106 may use this “sorted view” to generate sorted data 114.Alternatively, sorted data 114 may represent the sorted view of theinput data 108 using the pluggable indices 206, 208, 210, rather thanbeing a separate sorted copy of data 108.

Referring again to FIG. 1, in an example implementation of the sorter112, instructions 110 to sort input data 108 according to the Time Keywith entries sorted in ascending order is received by the databaseserver 106. In response to receipt of instructions 110, the sorter 112accesses data table 200 and the time key dimension table 212 (i.e., thedata associated with the sort instructions 110). The sorter 112 maydetermine whether a sorting index is available for performing tasksassociated with sort instructions 110 (e.g., whether the pluggablesorting index 206 associated with the Time Key has already beengenerated and stored in server 106). If pluggable sorting index 206 isnot available, the sorter 112 generates the pluggable sorting index 206as described above.

The pluggable sorting index 206 is then used to generate sorted data 114from data table 200 and, optionally, from information stored in timedimension table 212. For instance, the sorted data may include therecords 204 a-i of table 200 arranged, using sorting index 206,according to the order of the entries of pluggable sorting index 206.For instance, the records 204 a-i may be arranged in the followingorder: 204 f (record key 5), 204 c (record key 2), 204 b (record key 1),204 i (record key 8), 204 e (record key 4), 204 g (record key 6), 204 h(record key 7), 204 d (record key 3), 204 a (record key 0). The sorteddata 114 may also include information from the associated dimensiontable 212 arranged in the same sorted order. For example, the sorteddata 114 may include columns of entries associated with “day_of_month,”“weekday,” etc., as shown in FIG. 2. Sorted data 114 may be stored orprovided to computing device 122 for further analysis.

Joiner for Data Stream Output Generation

As described above with respect to the example of FIG. 1, in someembodiments, the joiner 118 is configured to join a first and seconddataset from input data 108 to efficiently and effectively generatejoined output 120, which may be provided, as it is generated, via datastream 116. FIG. 3 illustrates the operation of a joiner 300. The joiner118 of FIG. 1 may be joiner 300.

The joiner 300 is configured to receive instructions 110 to join a firstdataset 304 and a second dataset 306 at step 302. For instance, theinstructions 110 may indicate which portions of the datasets 304 and 306should be joined and included in the output of the joiner (e.g., as partof output data 120 and/or data stream 116). The instructions 110 may bereceived from an external source (e.g., from a user operating device 122and indicating a particular join of the datasets 304 and 306) or may beaccessed from memory (e.g., at a time based on scheduling data 412 ofFIG. 4).

Each of the first dataset 304 and the second dataset 306 generallyincludes a portion of the input data 108 described above with respect toFIG. 1. For example, each of the datasets 304, 306 may include all or aportion of the information included in datasets 104 a-c of FIG. 1. Asanother example, dataset 304 may include all or a portion of dataset 106a received from data source 104 a, and dataset 306 may include all or aportion of dataset 106 b received from data source 104 b. As illustratedin FIG. 3, dataset 304 includes a plurality of data blocks 308 a-e. Eachdata block 308 a-e includes records 310 a-e with corresponding recordkeys (e.g., represented by the numbers corresponding to each of records310 a-e). As an example, each of the data blocks 308 a-e may store adata table or a portion of a data table (e.g., such as tables 200, 212,214, 216 of FIG. 2, described above). In other words, records 310 a-emay correspond to rows of entries in the data tables. Similarly, dataset306 includes data blocks 312 a-h, and each data block 312 a-h includescorresponding records 314 a-h. Each record 314 a-h includes acorresponding record key. In the example of FIG. 3, only a single recordkey is shown for each of the sets of records 314 a-h for clarity. Asdescribed in greater detail below, the joiner 300, among other things,compares values of the record keys of records 310 a-e from the firstdataset 304 and records 314 a-h from the second dataset 306 to moreefficiently join portions of the first and second datasets 304 and 306than was possible using previously available technology.

At step 316, the datasets 304, 306 may be sorted (e.g., if the datasets34, 306 were not already sorted, for example, by sorter 112 of FIG. 1).The same sorting instructions 110 are used to sort both datasets 304,306, and both datasets 304, 306 are sorted based on the same record key.For example, the records 310 a-e of data blocks 308 a-e may be sorted inorder of increasing record key values, as shown in the example of FIG.3. Generally, sorting may be performed based on any appropriate propertyof the record keys as appreciated by one of ordinary skill in the art.In some embodiments, pluggable sorting, as described above with respectto FIG. 2, is used to sort each of datasets 304, 306. For example,rather than duplicating or manipulating the records 310 a-e and 314 a-hstored in datasets 304 and 306, a pluggable sorting index (e.g., such asone of the pluggable sorting indices 206, 208, 210 described above withrespect to FIG. 2) may be used to automatically “view” the datasets 304,306 in a sorted order. In some embodiments, the datasets 304, 306 may besorted prior to being accessed or received by the joiner 300. In otherwords, datasets 304, 306 may be pre-sorted (e.g., by the sorter 112 ofFIG. 1). In such embodiments, the datasets 304, 306 may correspond to aportion of the sorted data 114 of FIG. 1.

The set of record keys representing the initial (e.g., highest value)record keys of the sorted records 310 a-e is referred to in thisdisclosure as a first “heap” 318. In the example of FIG. 3, the firstheap 318 includes the record keys with the highest value for each of thedata blocks 308 a-e of dataset 304. However, it should be understood,that the first heap 318 may alternatively include the record keys forthe records with the initial value for any other appropriate sortedorder (e.g., with the lowest numerical values if dataset 304 were sortedin descending numerical order). Sorted dataset 306 also has acorresponding second heap 320, which includes the set of record keysrepresenting the initial (e.g., highest value) record keys of the sortedrecords 314 a-h.

With datasets 304, 306 appropriately sorted for the identification ofthe first heap 318 and second heap 320, the joiner may proceed tosubsequent steps to join datasets 304 and 306, as illustrated in FIG. 3.At step 322, the joiner 300 extracts a first root element 324 of thefirst heap 318. The first root element 324 is generally the element withthe highest, or first, value (i.e., according to the sortinginstructions 110 used to sort dataset 304). For example, the first rootelement 324 in the example of FIG. 3 is the record key from the firstheap 318 with the largest numerical value of 5453. At step 326, thejoiner 300 extracts a second root element 328 from the second heap 320using the same or a similar process to that described above with respectto step 322. In the example of FIG. 3, the second root element is 9522.

At step 330, the joiner 300 compares the extracted first root element324 to the extracted second root element 328. In the example of FIG. 3,the extracted first root element 324 is 5453, and the extracted secondroot element is 9522. Since these values are not equal, the extractedroot elements 324 and 328 do not match. Since at step 330, the extractedfirst root element 324 and the extracted second root element 330 do notmatch, the joiner 300 proceeds to step 332 and discards the recordassociated with the root element with the larger value from thecorresponding heap (i.e., the record corresponding to the second rootelement 330 is discarded). The joiner 300 then returns to step 326 andextracts the next root element 334 from the second heap 320. This newlyextracted root element 334 is 5453 and matches the extracted first rootelement 324, which is also 5453. Thus, the joiner 300, having determinedat step 330 that the root elements 324 and 334 match, generates outputat step 336 by joining the records corresponding the first and secondroot elements 324 and 334.

Joining the record corresponding to the first root element 324 and therecord corresponding to the second root element 334 may include, forexample, accessing these records from the first and second datasets 304,306 and appending the record corresponding to the second root element334 to the record corresponding to the first root element 324. If therecord corresponding to the second root element 334 includes one or moreentries that are the same as those of the record corresponding to thefirst root element 324 (e.g., if the same column key appears in bothdatasets), these repeat entries may be removed (i.e., such that eachentry only appears once). For instance, if the record key 5453 is anumerical customer identifier, the record corresponding to the firstroot element 324 may include a first set of customer information (e.g.,dates of transactions with the customer as shown in the Time Key column202 b of Table 200 of FIG. 2) and a second set of customer information(e.g., associated with the time dimension table 212 and/or any ofcolumns 202 c-e of table 200 of FIG. 2). The generated output may beincluded in the output data 120 of FIG. 1, which may be transmitted oraccessed as part of data stream 116, as output 120 is generated. Thesteps described above are generally repeated as appropriate until eachrecord of the first and second datasets 304, 306 has been processed.

The unique functionality of the joiner 300 described above mayfacilitate the real-time transmission or access of joined data as it isgenerated, rather than requiring, as was the case in previousapproaches, that the entirety of the first and second datasets 304, 306be joined before the resulting data is available. The joiner 300 alsoutilizes fewer processing and memory resources than previous tools forjoining datasets. For instance, once records are processed by the joiner300 (e.g., whether included in the output or determined to not have amatch in the other dataset), superfluous records may be removed frommemory, thereby decreasing the amount of memory required for joinoperations.

Example Devices for Implementing the Database System

FIG. 4 is an embodiment of a device 400 configured to implement thedatabase system 100. The device 400 comprises a processor 402, a memory404, and a network interface 406. The device 400 may be configured asshown or in any other suitable configuration. The device 400 may beand/or may be used to implement any one or more of the data sources 102a-c, database server 106, and computing device 122 of FIG. 1.

The processor 402 comprises one or more processors operably coupled tothe memory 404. The processor 402 is any electronic circuitry including,but not limited to, state machines, one or more central processing unit(CPU) chips, logic units, cores (e.g. a multi-core processor),field-programmable gate array (FPGAs), application specific integratedcircuits (ASICs), or digital signal processors (DSPs). The processor 402may be a programmable logic device, a microcontroller, a microprocessor,or any suitable combination of the preceding. The processor 402 iscommunicatively coupled to and in signal communication with the memory404 and the network interface 406. The one or more processors areconfigured to process data and may be implemented in hardware orsoftware. For example, the processor 402 may be 8-bit, 16-bit, 32-bit,64-bit or of any other suitable architecture. The processor 402 mayinclude an arithmetic logic unit (ALU) for performing arithmetic andlogic operations, processor registers that supply operands to the ALUand store the results of ALU operations, and a control unit that fetchesinstructions from memory and executes them by directing the coordinatedoperations of the ALU, registers and other components. The one or moreprocessors are configured to implement various instructions. Forexample, the one or more processors are configured to executeinstructions to implement the function disclosed herein, such as some orall of method 200. In an embodiment, the function described herein isimplemented using logic units, FPGAs, ASICs, DSPs, or any other suitablehardware or electronic circuitry.

The memory 404 is operable to store input data 408, sort and/or joininstructions 410, scheduling data 412, sorted data 414, joined data 416,output data 418, and/or any other data or instructions. The sort and/orjoin instructions 410 and scheduling data 412 may comprise any suitableset of instructions, logic, rules, or code operable to execute thefunction described herein. The memory 404 comprises one or more disks,tape drives, or solid-state drives, and may be used as an over-flow datastorage device, to store programs when such programs are selected forexecution, and to store instructions and data that are read duringprogram execution. The memory 404 may be volatile or non-volatile andmay comprise read-only memory (ROM), random-access memory (RAM), ternarycontent-addressable memory (TCAM), dynamic random-access memory (DRAM),and static random-access memory (SRAM).

The input data 408 generally includes but is not limited to the inputdata 108 of FIG. 1. For instance, the input data 408 may include other(e.g., previously) received or accessed data. As described above, thesort and/or join instructions 410 generally include rules and/orinstructions for sorting the input data 408. For example, the sortand/or join instructions 410 may be the same as or provided as part ofinstructions 110 of FIG. 1. Accordingly, the sort and/or joininstructions 410 may indicate how records should be sorted based onsortable properties of entries associated with the records (e.g., inascending or descending numerical or alphabetical order). Sortableproperties may be the values of numbers included in entries (e.g., tosort based on ascending or descending numerical value) and/or theletters included in entries (e.g., to sort based on ascending ordescending alphabetical order). The scheduling data 412 may includeinformation and/or instructions for scheduling automatic operation offunctions described in this disclosure. For instance, the schedulingdata 412 may include times and dates at which particular input data 410should be sorted and/or joined by the device 400 (i.e., when the device400 is the database server 106 of FIG. 1). The sorted data generallyincludes but is not limited to the sorted data 114 described above withrespect to FIG. 1. The joined data includes but is not limited to theoutput data 120 of FIG. 1 (i.e., the output of the joiner 118 of FIG.1). The output data 418 may include all or portions of one or both ofthe sorted data 414 and the joined 416.

The network interface 406 is configured to enable wired and/or wirelesscommunications (e.g., via network 124). The network interface 406 isconfigured to communicate data between the device 400 and other networkdevices, systems, or domain(s). For example, the network interface 406may comprise a WIFI interface, a local area network (LAN) interface, awide area network (WAN) interface, a modem, a switch, or a router. Theprocessor 402 is configured to send and receive data using the networkinterface 406. The network interface 406 may be configured to use anysuitable type of communication protocol as would be appreciated by oneof ordinary skill in the art.

While several embodiments have been provided in the present disclosure,it should be understood that the disclosed systems and methods might beembodied in many other specific forms without departing from the spiritor scope of the present disclosure. The present examples are to beconsidered as illustrative and not restrictive, and the intention is notto be limited to the details given herein. For example, the variouselements or components may be combined or integrated in another systemor certain features may be omitted, or not implemented.

In addition, techniques, systems, subsystems, and methods described andillustrated in the various embodiments as discrete or separate may becombined or integrated with other systems, modules, techniques, ormethods without departing from the scope of the present disclosure.Other items shown or discussed as coupled or directly coupled orcommunicating with each other may be indirectly coupled or communicatingthrough some interface, device, or intermediate component whetherelectrically, mechanically, or otherwise. Other examples of changes,substitutions, and alterations are ascertainable by one skilled in theart and could be made without departing from the spirit and scopedisclosed herein.

To aid the Patent Office, and any readers of any patent issued on thisapplication in interpreting the claims appended hereto, applicants notethat they do not intend any of the appended claims to invoke 35 U.S.C. §112(f) as it exists on the date of filing hereof unless the words “meansfor” or “step for” are explicitly used in the particular claim.

What is claimed is:
 1. A system comprising: a database server configuredto: receive input data from one or more data sources, the input datacomprising a data table, the data table comprising records (e.g., rows),each record comprising a record key and one or more entries, whereineach of the one or more entries is associated with a correspondingcolumn key of the data table; and a sorter configured to: receiveinstructions for sorting the input data according to the first columnkey, the instructions indicating an order in which to sort the inputdata; in response to receipt of the instructions, generate, based on theorder indicated by the instructions, a first pluggable sorting indexassociated with a first column key of the data table, the firstpluggable sorting index comprising the record keys arranged in a sortedorder according to sortable properties of entries associated with thefirst column key, wherein the sortable properties of the entriesassociated with the first column key are alphanumeric charactersincluded in the entries, wherein the alphanumeric characters can besorted in one or both of a numerical and an alphabetical order; andgenerate a first sorted dataset, based on the data table and the firstpluggable sorting index, wherein the first sorted dataset comprises theentries associated with the first column key arranged according to thesorted order of the first pluggable sorting index.
 2. The system ofclaim 1, the wherein the sorter is further configured to generate thefirst pluggable sorting index by: determining, based on the receivedinstructions, sorting criteria for the entries associated with the firstcolumn key, wherein the sorting criteria correspond to rules for sortingthe entries in either ascending or descending order; determining thesorted order for the entries associated the first column key by applyingthe sorting criteria to the entries associated with the first columnkey; and generating an array comprising the record keys of the datatable arranged in the determined sorted order, wherein the firstpluggable sorting index comprises the generated array.
 3. The system ofclaim 1, wherein the database server is further configured to access theentries associated with the first column key in the sorted order suchthat the records are accessed without generating a sorted copy of theinput data.
 4. The system of claim 1, wherein the input data furthercomprises a dimension table associated with the first column key, thedimension table storing dimension columns with supplemental entriesassociated with a data type of the first column key; and the sorterfurther configured to generate the sorted dataset such that the sorteddataset includes the entries associated with the first column key andthe supplemental entries of at least one of the dimension columns of thedimension table.
 5. The system of claim 1, the sorter server furtherconfigured to: receive second instructions for sorting the input dataaccording to the second column key, the second instructions indicating asecond order in which to sort the input data; in response to receipt ofthe second instructions, generate, based on the second order indicatedby the second instructions, a second pluggable sorting index associatedwith a second column key of the data table, the second pluggable sortingindex comprising the record keys arranged in a second sorted orderaccording to sortable properties of entries associated with the secondcolumn key; and generate a second sorted dataset, based on the datatable and the second pluggable sorting index, wherein the first sorteddataset comprises the entries associated with the second column keyarranged according to the second sorted order of the second pluggablesorting index.
 6. The system of claim 1, wherein following generation ofthe first sorted dataset, the data table is unchanged.
 7. The system ofclaim 1, wherein the input data comprises data received from two or moredifferent data sources.
 8. A method comprising: receiving input datafrom one or more data sources, the input data comprising a data table,the data table comprising records, each record comprising a record keyand one or more entries, wherein each of the one or more entries isassociated with a corresponding column key of the data table; receivinginstructions for sorting the input data according to the first columnkey, the instructions indicating an order in which to sort the inputdata; in response to receiving the instructions, generating, based onthe order indicated by the instructions, a first pluggable sorting indexassociated with a first column key of the data table, the firstpluggable sorting index comprising the record keys arranged in a sortedorder according to sortable properties of entries associated with thefirst column key, wherein the sortable properties of the entriesassociated with the first column key are alphanumeric charactersincluded in the entries, wherein the alphanumeric characters can besorted in one or both of a numerical and an alphabetical order; andgenerating a first sorted dataset, based on the data table and the firstpluggable sorting index, wherein the first sorted dataset comprises theentries associated with the first column key arranged according to thesorted order of the first pluggable sorting index.
 9. The method ofclaim 8, further comprising generating the first pluggable sorting indexby: determining, based on the received instructions, sorting criteriafor the entries associated with the first column key, wherein thesorting criteria correspond to rules for sorting the entries in eitherascending or descending order; determining the sorted order for theentries associated the first column key by applying the sorting criteriato the entries associated with the first column key; and generating anarray comprising the record keys of the data table arranged in thedetermined sorted order, wherein the first pluggable sorting indexcomprises the generated array.
 10. The method of claim 8, furthercomprising accessing the entries associated with the first column key inthe sorted order such that the records are accessed without generating asorted copy of the input data.
 11. The method of claim 8, wherein theinput data further comprises a dimension table associated with the firstcolumn key, the dimension table storing dimension columns withsupplemental entries associated with a data type of the first columnkey; and the method further comprising generating the sorted datasetsuch that the sorted dataset includes the entries associated with thefirst column key and the supplemental entries of at least one of thedimension columns of the dimension table.
 12. The method of claim 8,further comprising: receiving second instructions for sorting the inputdata according to the second column key, the second instructionsindicating a second order in which to sort the input data; in responseto receiving the second instructions, generating, based on the secondorder indicated by the second instructions, a second pluggable sortingindex associated with a second column key of the data table, the secondpluggable sorting index comprising the record keys arranged in a secondsorted order according to sortable properties of entries associated withthe second column key; and generating a second sorted dataset, based onthe data table and the second pluggable sorting index, wherein the firstsorted dataset comprises the entries associated with the second columnkey arranged according to the second sorted order of the secondpluggable sorting index.
 13. The method of claim 8, wherein followinggenerating the first sorted dataset, the data table is unchanged. 14.The method of claim 8, wherein the input data comprises data receivedfrom two or more different data sources.
 15. A system for automaticallysorting information stored in a data table, the system comprising asorter configured to: access input data comprising a data table, thedata table comprising records, each record comprising a record key andone or more entries, wherein each of the one or more entries isassociated with a corresponding column key of the data table; access afirst pluggable sorting index associated with a first column key of thedata table, the first pluggable sorting index comprising the record keysarranged in a sorted order according to sortable properties of entriesassociated with the first column key, wherein the sortable properties ofthe entries associated with the first column key are alphanumericcharacters included in the entries, wherein the alphanumeric characterscan be sorted in one or both of a numerical and an alphabetical order;and generate a first sorted dataset, based on the data table and thefirst pluggable sorting index, wherein the first sorted datasetcomprises the entries associated with the first column key arrangedaccording to the sorted order of the first pluggable sorting index. 16.The system of claim 15, the sorter further configured to generate thefirst pluggable sorting index by: determining, based on predefinedsorting instructions associated with the sorter, sorting criteria forthe entries associated with the first column key, wherein the sortingcriteria correspond to rules for sorting the entries in either ascendingor descending order; determining the sorted order for the entriesassociated the first column key by applying the sorting criteria to theentries associated with the first column key; and generating an arraycomprising the record keys of the data table arranged in the determinedsorted order, wherein the first pluggable sorting index comprises thegenerated array.
 17. The system of claim 15, wherein the sorter isfurther configured to access the entries associated with the firstcolumn key in the sorted order such that the records are accessedwithout generating a sorted copy of the input data.
 18. The system ofclaim 15, wherein the input data further comprises a dimension tableassociated with the first column key, the dimension table storingdimension columns with supplemental entries associated with a data typeof the first column key; and the sorter further configured to generatethe sorted dataset such that the sorted dataset includes the entriesassociated with the first column key and the supplemental entries of atleast one of the dimension columns of the dimension table.
 19. Thesystem of claim 15, the sorter further configured to: access a secondpluggable sorting index associated with a second column key of the datatable, the second pluggable sorting index comprising the record keysarranged in a second sorted order according to sortable properties ofentries associated with the second column key; and generate a secondsorted dataset, based on the data table and the second pluggable sortingindex, wherein the first sorted dataset comprises the entries associatedwith the second column key arranged according to the second sorted orderof the second pluggable sorting index.
 20. The system of claim 15,wherein following generation of the first sorted dataset, the data tableis unchanged.